﻿ManageAdvert.SelectAllChange = function () {
    var checkedCount = 0;
    $("#gdList input[ad=ad]").each(function () {
        if ($(this).attr("checked") == "checked") {
            checkedCount = checkedCount + 1;
        }
    });
    //如果列表中都勾选了，则将全选设为勾选状态
    if ($("#gdList input[ad=ad]").length == checkedCount) {
        $("input[name='chbSelectAll']").attr("checked", true);
    }
    else {
        $("input[name='chbSelectAll']").attr("checked", false);
    }
}
